# --**coding:utf-8**--

import cv2
import os
import datetime
import hashlib

def addPointToPic(pic_path,point,save_name,save_path):
    img = cv2.imread(pic_path)
    point_size = 8
    point_color = (0,0,225)
    thickness = 4
    cv2.circle(img,point,point_size,point_color,thickness)
    cv2.imwrite(f"{save_path}/{save_name}",img)
    return True

def getStrfTime():
    return datetime.datetime.now().strftime('%Y-%M-%d %H:%M:%S')

def getMd5(data):
    data = data.encode()
    return hashlib.md5(data).hexdigest()

class Utils:
    def __init__(self):
        self.project_path = os.getcwd()

    def createReportFoldefr(self):
        # 创建文件夹
        folder_name = f"{getStrfTime()}-report"
        folder_path = f"{self.project_path}/{folder_name}"
        if not  os.path.exists(folder_path):
            os.mkdir(folder_path)
        return folder_path